/**   
* @Title: AvoidFormMultiSubAction.java
* @Package com.action.formr
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com   
* @date 2017年6月26日 下午9:50:51
* @version V1.0   
*/


package com.action.formr;

import com.opensymphony.xwork2.ActionSupport;

/**
* @ClassName: AvoidFormMultiSubAction
* @Description: TODO(测试禁止表单重复提交)
* @author antch,861710865@qq.com
* @date 2017年6月26日 下午9:50:51
* 
*/

public class AvoidFormMultiSubAction extends ActionSupport {

	/**
	* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
	*/
	
	private static final long serialVersionUID = 4396844205987811506L;

	private String username;
	
	private String password;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public String registerUser(){
		
		//模拟服务端进行长时间操作，客户端可以进行多次表单提交
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("用户注册");
		System.out.println(username);
		System.out.println(password);
		return SUCCESS;
	}
}
